---
description: Steps required to deploy SaaS Boilerplate apps on AWS
---

import ProjectName from '../../shared/components/ProjectName.component';

# Step 6: Deploy the app

## Switch context to proper environment stage

Run the following command that will switch context to specific environment stage.

```shell
saas aws set-env [STAGE_NAME]
```

## Deploy application's code

This step is optional because it usually should be run through CI/CD pipeline. We didn't want to limit you so we also
prepared a way to deploy the app fully from your local machine. There are two steps – building artifacts and deploying
them to specific AWS services.

You can build & deploy all services (Webapp, Backend, Workers etc) at once or just a single service.
If you want all services run commands below in project's main directory,
while for single service you need to go to that specific service directory.

### Build artifacts

Run following command to build artifacts out of code on your local machine:

```sh
pnpm saas build
```

### Deploy artifacts to the newly created env

Run following command to deploy artifacts, built in previous command, to AWS:

```sh
pnpm saas deploy
```

## Open the app

If you followed the guide and everything went right, your app should be deployed and each service should be available
under configured domains.
